package com.zbkj.admin.controller.merchant;

import com.zbkj.dal.pojo.response.OrderOperateRecordResponse;
import com.zbkj.dal.base.result.CommonResult;
import com.zbkj.service.service.OrderOperateRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 订单操作记录
 * @author tianzhonghai
 * 2023/11/22 22:09
 */
@Slf4j
@RestController
@RequestMapping("api/admin/merchant/orderOperate")
@Api(tags = "商户端订单控制器")
public class MerchantOrderOperateController {

    @Autowired
    private OrderOperateRecordService orderOperateRecordService;

    @ApiOperation(value = "按订单号列出订单操作记录")
    @RequestMapping(value = "/listOrderOperateRecordsByOrderNo/{orderNo}", method = RequestMethod.GET)
    public CommonResult<List<OrderOperateRecordResponse>> listOrderOperateRecordsByOrderNo(@PathVariable("orderNo") String orderNo) {
        return CommonResult.success(orderOperateRecordService.listOrderOperateRecordsByOrderNo(orderNo));
    }

}
